package com.designmodel.singletonmodel;

/**
 * Created by
 *
 * @author touni
 * @date 2019/4/1
 * @time 11:25
 */
public class MainDemp {


    public static void main(String[] args) {
        SingletonDemo singletonDemo = SingletonDemo.newInstance();
        long l1 = System.currentTimeMillis();
        for (int i = 0; i <10 ; i++) {
            singletonDemo.printStr();
        }
        long l2 = System.currentTimeMillis();
        System.out.println(l2-l1);
        long l3 = System.currentTimeMillis();
        for (int i = 0; i <10 ; i++) {
            SingletonDemo.getSingleton.printStr();
        }
        long l4 = System.currentTimeMillis();
        System.out.println(l4-l3);








    }

}
